package client;

import java.io.*;
import java.net.*;

class Send extends Thread
{
    Client client;

    Send(Client client)
    {
        this.client = client;
    }

    public void run()
    {
        BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
        String userInput;

        try {
            while ((userInput = stdIn.readLine()) != null) {
                client.out.println(userInput);
                if (userInput.equals("bye")) {
                    break;
                }
            }
            client.out.close();
            client.in.close();
            stdIn.close();
            client.clientSocket.close();
        } catch (IOException e) {}
    }
}
